<%@ page contentType="text/html;charset=UTF-8" language="java"  pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %>
<%@ taglib prefix="ssm" uri="http://ssm.elangzhi.com/jsp/tag/functions" %>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%--
2017年5月23日 闫增宝 选择地锁
Created by GaoXiang
Date: 2017-03-28 09:07:57 星期二
Version: 1.0
地锁列表
--%>

<!DOCTYPE html>
<!--[if IE 8]> <html lang="zh" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="zh" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="zh">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
    <meta charset="utf-8"/>
    <title>地锁 - 后台服务中心</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1" name="viewport"/>
    <meta content="地锁列表" name="description"/>
    <meta content="GaoXiang" name="author"/>
</head>
<!-- END HEAD -->
<body class="page-content-white  fade-in-up">

<!-- BEGIN CONTAINER -->
<div class="page-container">
    <!-- BEGIN PAGE TABLE-->
    <div class="portlet light">
        <div class="portlet-title">
            <div class="caption">
                <i class="icon-speech  font-blue-hoki"></i>
                <span class="caption-subject font-blue-hoki">选择地锁</span>
            </div>

        </div>
        <div class="portlet-body table-responsive">
            <div class="table-scrollable">
                <table
                        data-visible-pages="10" class="table table-bordered table-hover" id="table">
                    <thead>
                    <tr>
                        <th>地锁编号</th>
                        <th>停车场名称</th>
                        <th>地锁开关</th>
                        <th>当前状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <c:forEach var="item" items="${pageInfo}" varStatus="status">
                        <tr>
                            <td>${item.number}</td>
                            <td>${item.parking.name}</td>
                            <td>
                                <c:if test="${item.lockIo == '0'}">关闭</c:if>
                                <c:if test="${item.lockIo == '1'}">打开</c:if>
                            </td>
                            <td>
                                <c:if test="${item.status == '0'}">空闲</c:if>
                                <c:if test="${item.status == '1'}">已预约</c:if>
                                <c:if test="${item.status == '2'}">使用中</c:if>
                                <c:if test="${item.status == '3'}">电压不足</c:if>
                            </td>
                            <td>
                                <div class="btn-group btn-group-xs btn-group-solid">
                                        <button  onclick="ret('${item.id}','${item.number}')"  class="btn btn-success"> 选择 </button>
                                </div>
                            </td>
                        </tr>
                    </c:forEach>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <!-- END PAGE TABLE-->
</div>
<!-- END CONTAINER -->

<!-- BEGIN PAGE JAVASCRIPT-->
<script>

    function ret(id,name) {
        $("#lockId").val(id);
        $("#lockName").val(name);
        layer.close(layer_lockModule);
    }

</script>
<!-- END PAGE JAVASCRIPT-->
</body>
</html>
